// ActionScript file
import mx.styles.StyleManager;
import mx.styles.CSSStyleDeclaration;

private static var stylesInited:Boolean = initStyles();	
private static function initStyles():Boolean 
{
	if (!StyleManager.getStyleDeclaration(myClassName))
	{
		var newStyleDeclaration:CSSStyleDeclaration = new CSSStyleDeclaration();
		for (var stylename:String in defaultStyles)
		{
			newStyleDeclaration.setStyle(stylename, defaultStyles[stylename]);
		}
		StyleManager.setStyleDeclaration(myClassName, newStyleDeclaration, true);
	}
	return true;
}